﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AreaManage.aspx.cs" Inherits="Business_YiWu_AreaManage" Theme="normal"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>区域管理页面</title>
   <script language="javascript" type="text/javascript">
            function SelectAllCheckboxes(spanChk)
	        {
		        var xState=spanChk.checked;

		        elm = spanChk.form.elements;
		        for(i = 0; i < elm.length; i++)
		        {
			        if(elm[i].type == "checkbox" && elm[i].id != spanChk.id)
			        {
				        //elm[i].click();
				        if(elm[i].checked!=xState)
					        elm[i].click();	//elm[i].checked=xState;
			        }
		        }
	        }
    </script> 
</head>
<body style="background-color:#fcf6ec">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <!--导航-->
    <div class="normalnav">
            <div class="normalcontent">
               <span style="color: #ffffff">信息管理>>></span><span style="color: #f6ff00">区域管理</span></div>
    </div>
    
        <!-- AJAX面板 -->
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
           
            
    <!--查询-->
    <div class="normalmenu" style="position: absolute; z-index: 100; overflow:hidden;">
        <div  class="test" style="padding-left:10px;">
            <div style="line-height:40px;overflow:hidden;">
            <asp:CheckBox ID="ChkAll" runat="server" Text="全选" onclick="javascript:SelectAllCheckboxes(this)"
            Font-Size="14px" />
            <asp:ImageButton ID="butDelete" runat="server" ImageUrl="../../Images/Basic/shanchu.gif"
                OnClick="butDelete_Click" CausesValidation="False" ToolTip="删除" OnClientClick="return confirm('你确认删除吗？');"/>&nbsp;删除&nbsp;&nbsp;
            <asp:ImageButton ID="ibtnxinzeng" runat="server" ImageUrl="../../Images/Basic/tianjia.gif"
                CausesValidation="False" OnClick="ibtnxinzeng_Click" ToolTip="新增" />&nbsp;新增
            
             查询区域名称：<asp:DropDownList ID="ddl_SearchCondition" runat="server" Visible="false">
                <%--<asp:ListItem Value="0">全部</asp:ListItem>--%>
                <%--<asp:ListItem Value="AreaUserName">区域负责人姓名</asp:ListItem>--%>
                <asp:ListItem Value="AI_AreaName">区域名称</asp:ListItem>
                <%--<asp:ListItem Value="AreaSortName">区域简称</asp:ListItem>
                <asp:ListItem Value="PlaceNames">区域包含地名</asp:ListItem>--%>
             </asp:DropDownList>&nbsp;
            <asp:TextBox ID="txtPropasal" runat="server" Font-Size="14px" Width="123px"></asp:TextBox>
            <asp:ImageButton ID="ibtnsearch" runat="server" ImageUrl="../../Images/Basic/chaxun.gif"
                OnClick="butlookout_Click" />
            &nbsp; &nbsp;<span style="color: #426F98; font-family: 宋体; font-size: 12px">注：为空则查询所有</span>
            </div>
        </div>
    </div>
        
    <!--列表-->
    <div class="normalgrid" style="left:10px; width:96%;">
        <%--列表主题--%>
        <asp:GridView ID="gvitem" runat="server" SkinID="normal3" OnPageIndexChanging="gvitem_PageIndexChanging" Width="100%" OnRowCreated="gvGroup_RowCreated" PageSize="30"
            EmptyDataText="暂无" OnRowDataBound="gvitem_RowDataBound" AutoGenerateColumns="false" OnRowCommand="gvGroup_RowCommand">
            <Columns>
                <asp:TemplateField HeaderText="序号" Visible="False" HeaderStyle-Width="50px" HeaderStyle-Height="30px">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="LblID" Text='<%# Eval("AI_AreaID") %>'/>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="选择" HeaderStyle-Width="50px" HeaderStyle-Height="30px">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="false" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="50px" />
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="区域名称" HeaderStyle-Width="330px" HeaderStyle-Height="30px">
                    <ItemTemplate>
                        <%--<asp:Label runat="server" ID="lbl_aName" Text='<%# Eval("name") %>'  CommandName="Group_expended"/>--%>
                        <asp:LinkButton ID="lbl_aName" runat="server" Text='<%# Eval("AI_AreaName") %>'  CommandName="Group_expended"></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="330px" />
                </asp:TemplateField>
                
                <%--<asp:TemplateField HeaderText="区域简称" HeaderStyle-Width="200px" HeaderStyle-Height="35px">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lbl_aShortName" Text='<%# Eval("AreaSortName") %>'  CommandName="Group_expended"/>
                        
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="200px" />
                </asp:TemplateField>--%>
                
                <%--<asp:TemplateField HeaderText="区域负责人" HeaderStyle-Width="115px" HeaderStyle-Height="35px">
                    <ItemTemplate>
                       
                       <asp:Label runat="server" ID="lbl_Leader" Text="" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="115px" />
                </asp:TemplateField>--%>
                
               <%-- <asp:TemplateField HeaderText="区域包含地名" HeaderStyle-Width="25%" HeaderStyle-Height="35px">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lbl_AreaList" Text='<%# Eval("placenames") %>' />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="25%" />
                </asp:TemplateField>--%>
                
                <%--<asp:TemplateField HeaderText="区域包含经销商" HeaderStyle-Width="20%" HeaderStyle-Height="35px">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lbl_CustomerList" Text="" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="20%" />
                </asp:TemplateField>--%>
                
                 <asp:TemplateField HeaderText="权重" HeaderStyle-Width="50px" HeaderStyle-Height="30px">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lbl_Weight" Text='<%# Eval("AI_AreaOrder") %>' />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="50px" />
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="操作" HeaderStyle-Width="90px" HeaderStyle-Height="30px">
                    <ItemTemplate>
                        <a href='AreaEdit.aspx?id=<%# Eval("AI_AreaID") %>'>
                            修改</a>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="90px" />
                </asp:TemplateField>
            </Columns>
            <PagerSettings Visible="False" />
        </asp:GridView>
    </div>
        
       <!--分页--> 
        <div class="normalpager" style="right:30px;display:none">
            <asp:Label ID="lblNumbers" runat="server"></asp:Label>&nbsp;&nbsp;
            <asp:LinkButton ID="btnFirst" OnClick="PagerButtonClick" runat="server" CommandArgument="0"
                CausesValidation="False">最首页</asp:LinkButton>&nbsp;
            <asp:LinkButton ID="btnPrev" OnClick="PagerButtonClick" runat="server" CommandArgument="prev"
                CausesValidation="False">前一页</asp:LinkButton>&nbsp;
            <asp:Label ID="lblCurrentIndex" runat="server"></asp:Label>&nbsp;/&nbsp;
            <asp:Label ID="lblPageCount" runat="server"></asp:Label>
            <asp:LinkButton ID="btnNext" OnClick="PagerButtonClick" runat="server" CommandArgument="next"
                CausesValidation="False">后一页</asp:LinkButton>&nbsp;
            <asp:LinkButton ID="btnLast" OnClick="PagerButtonClick" runat="server" CommandArgument="last"
                CausesValidation="False">最后页</asp:LinkButton>
        </div>
       
       </ContentTemplate> 
        </asp:UpdatePanel> 
    </form>
</body>
</html>
